Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PATH env variable when gcc found in PATH #3895

Merged
merged 2 commits into from
Mar 14, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Mar 6, 2017

Resolves the github issue #3790: Blinky fails to build (on Mac) after
addition of linker script preprocessing feature. Paraphrasing, this
issue is that Homebrew on mac does not install arm-none-eabi-gcc in
the same location as arm-none-eabi-cpp, the C Pre-Processor. The tools
prior to this commit, and after turning on the pre-processing of the
linker-script will fail on any Mac homebrew installed toolchains.

This commit resolves the above issue by allowing the toolchain's path to
the executable to remain empty after a call to check_executable. When
this path is empty, the tools will search the PATH environment variable
for the executable.

TODO

  • Unit test to verify that this problem can never happen again.

Resolves the github issue ARMmbed#3790: Blinky fails to build (on Mac) after
addition of linker script preprocessing feature. Paraphrasing, this
issue is that Homebrew on mac does not install `arm-none-eabi-gcc` in
the same location as `arm-none-eabi-cpp`, the C Pre-Processor. The tools
prior to this commit, and after turning on the pre-processing of the
linker-script will fail on any Mac homebrew installed toolchains.

This commit resolves the above issue by allowing the toolchain's path to
the executable to remain empty after a call to `check_executable`. When
this path is empty, the tools will search the PATH environment variable
for the executable.
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 7, 2017

cc @Patater

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 7, 2017

Unit test to verify that this problem can never happen again.

Expected to come as part of this PR?

@theotherjimmy
Copy link
Contributor Author

@0xc0170 Yes.

@theotherjimmy
Copy link
Contributor Author

@0xc0170 Unit test added.

@Patater
Copy link
Contributor

Patater commented Mar 8, 2017

I tested this out to verify that it fixes my problem, and hey, it does! Thanks a lot!

@theotherjimmy
Copy link
Contributor Author

Thanks for testing it @Patater! We now have a regression test in this PR, so once it's merged we should not be allowed to merge code that breaks this behavior.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1662

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2017

retest uvisor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants